﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="ExtendedMvc.ModelViewPage<ExtendedMvc.WebTest.Model.Entities.User>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">Edit</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

	<h2>Edit</h2>

	<% using (var form = Html.ActionForm("Update", "Home", new { id = Model.Id })) {%>
		<%: form.ValidationSummary().ExcludePropertyErrors().DefaultMessage("Default Message").Render()%>
		<fieldset>
			<legend>New Way</legend>
			<div class="editor">
				<%: form.DisplayText(m => m.Id).AddLabel().Render()%>
			</div>
			<div class="editor">
				<%: form.TextBox(m => m.Name).AddLabel().AddValidationMessage().Render()%>
			</div>
			<div class="editor">
				<%: form.TextBox(m => m.Email).AddLabel().AddValidationMessage().Render()%>
			</div>
			<div class="editor">
				<%: form.RadioButtonSet(m => m.Deleted).Options(true, false).AddLabel().Render()%>
			</div>
			<div class="editor">
				<%: form.CheckBoxList(m => m.Deleted).Options("Option 1", "Option 2", "Option 3", "Option 4", "Option 5", "Option 6").Columns(2).AddLabel().Render()%>
			</div>
			<div class="editor">
				<%: form.TextArea(m => m.AdditionalInfo).AddLabel().Render()%>
			</div>
			<div class="actions">
				<%: form.SubmitLink("Save").Render() %> | <%: form.ResetLink("Reset").Render() %>
			</div>
		</fieldset>
	<% } %>

	<div>
		<%: Html.ActionLink("Back to List", "List").Render() %>
	</div>

</asp:Content>

